home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-17 | 21.0 KB | 456 lines | [TEXT/ttxt] |
- ************************************************************
- ************************************************************
-
- Mac F2C -- A FORTRAN-to-C translator for the Macintosh
-
- ************************************************************
- ************************************************************
-
- f2c kernel ©1989-1995 AT&T Bell Laboratories and Bellcore
- Macintosh Interface ©1994-1995 Igor Mikolic-Torreira
-
- This software is freeware: it may be used and copied freely so long
- as the copyright notices and associated documentation remain attached.
-
-
-
- CONTENTS
- *************************************************************
-
- A. WHAT IS Mac F2C
-
- B. WHAT IS NEW IN VERSION 1.2.2
-
- C. WHAT IS INCLUDED AND HOW IS IT ORGANIZED
-
- D. WHERE DO I GO FROM HERE
-
- E. CONTACTING THE AUTHOR
-
- F. CREDITS
-
- G. LICENSE AND OTHER ANNOYING LEGAL STUFF
-
-
-
-
- A. WHAT IS Mac F2C
- *************************************************************
-
- Mac F2C is a FORTRAN-to-C translator. It will read a file of FORTRAN
- code and produce a file of C code. When compiled and linked with the
- special support libraries included with Mac F2C, this C code will work
- just like the original FORTRAN code.
-
- Mac F2C is the Macintosh port of the UNIX program f2c developed at AT&T.
- AT&T permits the use of the f2c source code for non-profit purposes. You
- can get a copy of the f2c source code at netlib.att.com
-
- The minimum requirements to run Mac F2C are:
-
- (1) A 68020 or better
-
- (2) System 7.0 or later
-
- (3) At least 1 MB of available RAM (2 MB is preferred)
-
-
-
-
- B. WHAT IS NEW IN VERSION 1.2.2
- *************************************************************
-
- Changes from v1.2
- -----------------
-
- Version 1.2.2 is a minor update to v1.2 which adds:
-
- - Support for CodeWarrior v1.3.
-
- - Support for the new Symantec C/C++ (v8) for PPC code
- generation (also in v1.2.1).
-
- - Support for the version of THINK C/C++ (68K code generation)
- that is distributed with Symantec C/C++ v8 (also in v1.2.1).
-
- - An MPW hosted version of f2c and support for MPW PPC code
- generation (courtesy of Kris L. Jorgensen).
-
- - Guidance for making F2C-generated code multi-task cooperatively
- (courtesy of Mel Martinez).
-
- Version 1.2.2 is not yet able to automatically trigger Symantec C/C++ or
- CodeWarrior v1.3 compiles when it finishes translations. This feature is
- forthcoming in a future version of Mac F2C. Version 1.2.2 does correctly
- trigger THINK C/C++ compiles and CodeWarrior v1.2 68K/PPC (CW6) compiles.
-
-
- USERS UPGRADING FROM PRIOR VERSIONS: You need to re-install ALL libraries
- and project files, including main.c and f2c.h. There have been subtle
- changes in source code to accomodate Symantec v8 (both PPC code generation
- and changes in THINK libraries and headers in the version of THINK that
- comes with Symantec v8). See the more detailed instructions provided in
- the documentation folder for further information.
-
-
-
- C. WHAT IS INCLUDED AND HOW IS IT ORGANIZED
- *************************************************************
-
- The Mac F2C 1.2.2 distribution set contains the following items:
-
- (1) "Mac F2C v1.2.2 READ ME" -- This Read Me message.
-
- (2) "Mac F2C" -- the FORTRAN-to-C translator application, version 1.2.
- This is a fat binary containing both 68K and PowerPC native code.
-
- (3) "Mac F2C Documentation" -- a folder containing all relevant
- documentation for Mac F2C. This folder contains:
-
- - "INSTRUCTIONS (Symantec)" -- instructions for using Mac F2C
- with Symantec products: Symantec C/C++ (for PPC) and
- THINK C/C++ (for 68K).
-
- - "INSTRUCTIONS (CodeWarrior)" -- instructions for using Mac F2C
- with Metrowerk's CodeWarrior C compiler.
-
- - "AT&T Report 149.ps" -- a postscript file containing the AT&T
- report that serves as a compiler manual for Mac F2C.
-
- - "Mac F2C AppleEvents" -- a folder containing detailed information
- on how to drive Mac F2C using AppleEvents.
-
- - "Mac F2C & UNIX f2c" -- information on interchanging C code
- produced by Mac F2C on the Macintosh and the original f2c
- program on a UNIX machine.
-
- - "Mac F2C Known Bugs" -- summary of known bugs and suggestions
- for working around them.
-
- - "When Mac F2C code won't work…" -- Things to check whenever the
- code produced by Mac F2C doesn't run correctly.
-
- - "Cooperative Multitasking Mods" -- Mel Martinez's instructions
- for making F2C-generated code multitask cooperatively with other
- Macintosh applications.
-
- - "If Floats Don't Display Right" -- a folder discussing a common
- bug in float-to-ASCII conversion routines (including those
- provided in Symantec's and Metrowerks' C and C++ libraries).
- It includes some code you might be able to use to fix the
- problem.
-
- - "For THINK v6 and Earlier Users" -- instructions for setting up
- Mac F2C to work with earlier versions of Symantec's THINK
- compiler. All the THINK project files included in this
- distribution have been made using THINK C version 7.0.4. This
- file provides guidance on how to create equivalent project
- files using earlier versions of THINK C. This file also has
- information and guidance for setting up Mac F2C to work with
- other compilers.
-
- (4) "Mac F2C Libraries" -- a folder containing the libraries required to
- support programs translated by F2C. The libF77 library provides
- floating-point support; the libI77 library provides integer and I/O
- support. Symantec, THINK, and CodeWarrior project and library files
- are provided, along with all the source code. These need to be built
- and installed in the right places. Please read the appropriate
- version of the INSTRUCTIONS file for a detailed, step-by-step
- description of what to do with these files.
-
- (5) "Test Project ƒ" -- a folder containing a test FORTRAN program and
- the C output produced by Mac F2C. It also contains complete Symantec,
- THINK and CodeWarrior projects to compile and run the test program.
- See the appropriate version of the INSTRUCTIONS file for a detailed
- description of how to use the contents of this folder to verify
- correct operation of Mac F2C.
-
- (6) "Symantec/THINK Support" -- a folder containing items specifically
- required to use Mac F2C with Symantec C/C++ (PPC) and THINK C/C++
- (68K) compilers. This folder contains the following items:
-
- - "SPM Support" -- a folder containing support for the Symantec
- Project Manager (abbreviated SPM). It contains the following:
-
- + "For '(Project Models)'" -- a folder containing model SPM C
- and C++ projects for using code generated by Mac F2C. Please
- refer to the file "INSTRUCTIONS (Symantec)" for detailed
- information on how to use the contents of this folder.
-
- + "Build F2C Libs for SPM" -- an executable AppleScript for
- bringing all the SPM versions of the Mac F2C support
- libraries up to date. Please refer to the file
- "INSTRUCTIONS (Symantec)" for detailed information on how
- to use this script.
-
- - "TPM Support" -- a folder containing support for the THINK
- Project Manager (abbreviated TPM). It contains the following:
-
- + "For '(Project Models)'" -- a folder containing model TPM C
- and C++ projects for using code generated by Mac F2C. Please
- refer to the file "INSTRUCTIONS (Symantec)" for detailed
- information on how to use the contents of this folder.
-
- + "For plain THINK v7" -- a folder containing support for
- versions of THINK v7 that were either purchased as THINK v7
- or upgraded to (or beyond) v7 using the free on-line upgrades.
- It contains the following:
-
- = "For 'Standard Libraries'" -- a folder containing versions
- of the ANSI, unix, IOStreams, and CPlusLib project files
- distributed with THINK v7 that have been modified to work
- with Mac F2C output. These libraries should be placed in
- the TPM Standard Libraries folder and brought up to date.
- Please refer to the file "INSTRUCTIONS (Symantec)" for
- detailed information.
-
- = "Build F2C Libs for THINK" -- an executable AppleScript
- for bringing all the THINK v7 versions of the Mac F2C
- support libraries up to date. Please refer to the file
- "INSTRUCTIONS (Symantec)" for detailed information on how
- to use this script.
-
- + "For THINK v7 shipped with Sym 8" -- a folder containing
- support for the version of THINK v7 that is distributed as
- part of the Symantec C/C++ v8 package. It contains the
- following:
-
- = "For 'Standard Libraries'" -- a folder containing versions
- of the ANSI, unix, IOStreams, and CPlusLib project files
- distributed with THINK v7 on the Symantec v8 CD that have
- been modified to work with Mac F2C output. These libraries
- should be placed in the TPM Standard Libraries folder and
- brought up to date. Please refer to the file
- "INSTRUCTIONS (Symantec)" for detailed information.
-
- = "For folder containing TPM" -- a folder containing two
- THINK projects used to build appropriate versions of the
- precompiled headers. These need to be placed in the
- folder which contains the TPM. Please refer to the file
- "INSTRUCTIONS (Symantec)" for detailed information.
-
- = "Build F2C Libs for TPM" -- an executable AppleScript
- for bringing all the THINK v7 (from Symantec v8) versions
- of the Mac F2C support libraries up to date. Please refer
- to the file "INSTRUCTIONS (Symantec)" for detailed
- information on how to use this script.
-
- (7) "CodeWarrior Support" -- a folder containing items specifically
- required to use Mac F2C with Metrowerk's CodeWarrior C/C++ compiler.
- This folder contains the following items:
-
- - "For '(Project Stationary)'" -- a folder containing four CodeWarrior
- project stationary files for using C and C++ code generated by Mac
- F2C. Two files are for producing 68K code, the other two for PPC
- code. Please refer to the file "INSTRUCTIONS (CodeWarrior)" for
- detailed information on how to use the contents of this folder.
-
- - "For 'Metrowerks C/C++ ƒ'" -- a folder containing the files
- "main.c" and "f2c.h" which are required to run code translated by
- Mac F2C. Please refer to the file "INSTRUCTIONS (CodeWarrior)" for
- detailed information on how to use the contents of this folder.
-
- - "F2C MPW/ToolServer Tools" -- a folder containing MPW/ToolServer
- tools for use with CodeWarrior. Please refer to the files
- "ToolServer READ ME" and "MPW READ ME" contained in this folder
- for detailed information on how to use the contents of this folder.
-
- - "CW6 Project Files" -- a folder containing CodeWarrior v1.2 (CW6
- CD) project files for users that are still using the earlier
- version of CodeWarrior.
-
- (8) "MPW Support" -- a folder containing F2C for MPW as developed by Kris
- L. Jorgensen. F2C for MPW is 68K/PPC native tool that will let you use
- F2C in conjunction with MPW. It includes "FAT", PowerPC, and 68K versions
- of the F2C tool. You will need MPW 3.4 to run the PowerPC native versions.
- See the instructions included in this folder.
-
-
-
-
-
- D. WHERE DO I GO FROM HERE
- *************************************************************
-
- The next step is to read the set-up and use instructions. You should read
- either "INSTRUCTIONS (Symantec)" or "INSTRUCTIONS (CodeWarrior)" depending
- on which compiler you plan to use. Mac F2C is _not_ ready to go out of the
- box, so please read these instructions to see how to set up the support
- libraries and use the C code produced by Mac F2C. I also strongly
- recommend using the included test program to verify correct operation of
- Mac F2C and the support libraries. Again, information on how to do this is
- provided in the two INSTRUCTIONS files.
-
- You should also read the more detailed documentation on the FORTRAN-to-C
- compiler itself. The document "AT&T Report 149.ps" is a PostScript file
- which you can download to any PostScript printer. It will produce a copy
- of "AT&T Computing Science Technical Report No. 149." This report provides
- very detailed documentation on f2c, the UNIX program which is the
- translator at the core of Mac F2C. Consider this report your compiler and
- language reference manual. I recommend all users print out and read this
- report.
-
- If you want to drive Mac F2C with AppleEvents, check out the folder "Mac
- F2C Apple Events". It contains detailed information on sending Apple
- Events to Mac F2C. It also includes some sample AppleScripts and header
- files for use with your own code.
-
- Additional useful information appears in the documents contained in the
- folder "Mac F2C Documentation". Before sending a bug report please glance
- at "Mac F2C Known Bugs". If you plan on moving code between a UNIX machine
- and a Macintosh and/or will be mixing code translated by f2c on a UNIX
- machine and Mac F2C on a Macintosh, please look at "Mac F2C & UNIX f2c".
- If you have trouble getting the C code produced by Mac F2C to run
- correctly, read "When Mac F2C code won't run…". Finally, if floating point
- values do not appear to round correctly when output, read the information
- in the folder "If Floats Don't Display Right".
-
-
-
- E. CONTACTING THE AUTHOR
- *************************************************************
-
- My name is Igor Mikolic-Torreira and I can be reached at
- igormt@alumni.caltech.edu.
-
- If you find Mac F2C useful, please drop me a note. If you really think it
- is the most useful thing in the whole world and worth its weight in gold,
- please donate that amount of gold to your favorite charity ;)
-
- The latest version of Mac F2C (and betas of unreleased versions) can be
- obtained at <ftp://alumni.caltech.edu/pub/Mac_F2C>. A current bug list
- (with work arounds) is also kept in this directory.
-
- I have started to keep a mailing list which I will use to distribute Mac
- F2C related information such as bug alerts, patches, and new versions. If
- you wish to be added to this mailing list, please send me an email
- specifically requesting to be added to this list. Also let me know if you
- are interested in being a beta-tester for future versions of Mac F2C.
-
- If you find any bugs or would like to request a particular feature, let me
- know. I will try to fix interface bugs or at least provide work-arounds
- promptly. I will forward compiler bugs to AT&T. If you believe you have a
- code generation bug, _please_ send me a sample of the FORTRAN code that
- produces the problem together with the C output and your Symantec/THINK or
- CodeWarrior project file(s). If you can create a minimal example, that's
- even better and you will earn my eternal gratitude. Before sending me a
- bug report, please read "Mac F2C Known Bugs" as Mac F2C has some problems
- that I am quite aware of. If your translated programs compile without
- errors but don't run, take a look at the file "When Mac F2C Code Won't
- Run…" for information on the most common problem with translated code and
- how to fix it.
-
- You can send comments and questions on any part of the Mac F2C package to
- me. I can provide CodeWarrior C/C++, Symantec C/C++, and THINK C/C++
- support. However, Dirk Froehling (who contributed all of the CodeWarrior
- support files used in this version of Mac F2C) has a lot more experience
- with CodeWarrior than I do. He has graciously allowed me to distribute his
- email address. You can send questions or comments on Mac F2C's CodeWarrior
- support directly to him at dirk@gaga.maschinenbau.uni-dortmund.de.
-
- The F2C for MPW package was put together by Kris L. Jorgensen whom you
- can reach at kris@ecn.purdue.edu. I've never used MPW (nor do I plan to)
- so if you have any questions with F2C for MPW, please contact Kris (if
- you send questions to me, I'll just forward them to him).
-
-
-
- F. CREDITS
- *************************************************************
-
- A lot of people have contributed to Mac F2C, either knowingly or
- unknowingly. Many thanks to....
-
- AT&T and Bellcore for developing f2c and allowing others to make use of the
- source code. Mac F2C v1.2 incorporates the f2c version of 13 Nov 1994.
-
- Dirk Froehling of Germany for figuring out how to make the support
- libraries compile under CodeWarrior and for providing CodeWarrior project
- files and libraries. All of the CodeWarrior support in v1.2 is due to Dirk
- (I now have a copy of CodeWarrior, but Dirk's libraries are so good I
- wouldn't dream of touching them). Dirk also suggested many of the new
- features -- including the interaction (via AppleEvents) with THINK and
- CodeWarrior. Additionally, because I don't have regular access to a
- PowerPC, Dirk also did all the testing of the PPC native versions.
- Needless to say, I could not have produced a PowerPC version without Dirk's
- help.
-
- Kris L. Jorgensen for putting together the F2C for MPW package and
- allowing me to distribute it with Mac F2C.
-
- Mel Martinez for figuring out how to inject cooperative multi-tasking
- into code generated by Mac F2C.
-
- Tom Emerson of Symantec and Greg Galanos of Metrowerks for providing copies
- of their development systems and helping me integrate Mac F2C with them.
- Special thanks to Tom for allowing me to plagarize some of his
- AppleScripts.
-
- Jens Alfke of Apple Computer for AEBuild and related AppleEvent utilities.
- Mac F2C incorporates his AEGizmos v1.3.4 package (this includes AEBuild,
- AEPrint and other goodies). For anyone not familiar with AEBuild, it is by
- far the easiest way to build AppleEvent object descriptors. Hours of
- frustration are replaced by a few lines of easy to understand code. If you
- don't have it, get it!
-
- Jim Luther of Apple Macintosh Developer Technical Support for the
- "MoreFiles" collection of FileManager Utilities. Mac F2C incorporates
- MoreFiles 1.2.1.
-
- Gary Woodcock of Apple Computer for the "StdPrefsLib" library of routines
- to handle preferences and preference files. Mac F2C incorporates version
- 1.0 of the Standard Prefs Library (as distributed on the "develop
- Bookmark" CD).
-
- And last -- but certainly not least -- to my wife Beth for patiently
- tolerating many late nights when I paid more attention to Mac F2C than I
- did to her.
-
-
-
- G. LICENSE AND OTHER ANNOYING LEGAL STUFF
- *************************************************************
-
- The compiler engine of Mac F2C is based on the unix version of f2c and is
- Copyright 1990-1995 by AT&T Bell Laboratories and Bellcore.
-
- Permission to use, copy, modify, and distribute this software and its
- documentation for any purpose and without fee is hereby granted, provided
- that the above copyright notice appear in all copies and that both that the
- copyright notice and this permission notice and warranty disclaimer appear
- in supporting documentation, and that the names of AT&T Bell Laboratories
- or Bellcore or any of their entities not be used in advertising or
- publicity pertaining to distribution of the software without specific,
- written prior permission.
-
- AT&T and Bellcore disclaim all warranties with regard to this software,
- including all implied warranties of merchantability and fitness. In no
- event shall AT&T or Bellcore be liable for any special, indirect or
- consequential damages or any damages whatsoever resulting from loss of use,
- data or profits, whether in an action of contract, negligence or other
- tortious action, arising out of or in connection with the use or
- performance of this software.
-
-
- The Macintosh interface portion of Mac F2C was written and is
- Copyright 1994-1995 by Igor Mikolic-Torreira.
-
- Permission to use, copy, modify, and distribute this software and its
- documentation for any purpose and without fee is hereby granted, provided
- that the above copyright notice appear in all copies and that both that the
- copyright notice and this permission notice and warranty disclaimer appear
- in supporting documentation, and that the name of Igor Mikolic-Torreira not
- be used in advertising or publicity pertaining to distribution of the
- software without specific, written prior permission.
-
- Igor Mikolic-Torreira disclaims all warranties with regard to this
- software, including all implied warranties of merchantability and fitness.
- In no event shall Igor Mikolic-Torreira be liable for any special, indirect
- or consequential damages or any damages whatsoever resulting from loss of
- use, data or profits, whether in an action of contract, negligence or other
- tortious action, arising out of or in connection with the use or
- performance of this software.
-
-
-
-